<template>
  <div>
    配置底部图片
  </div>
</template>

<script>
import axios from 'axios';
export default {
  name: "ConfigBg",
  props: {
    selectStau: {
      type: String,
      default: () => ''
    },
    // 当前导航栏index
    navindex: {
      type: Number,
      default: () => {
        return -1
      }
    }
  },
  data() {
    return {
      // 可选择布局的列表
      screenMes: {},
      // 当前模板底部导航栏信息
      cockpitNavigationList: []
    }
  },
  watch: {
    navindex(newval) {
      setTimeout(
        () => {
          console.log(newval)
        }
      )
    }
  },
  mounted() {
    this.gettemplemes()
  },
  methods: {
    // 获取驾驶舱的详情
    gettemplemes() {
      let query = this.$route.query;
      let baseurl = this.$zhurl
      let requrl = baseurl + '/cockpit/queryInfo'
      if (query.organizationMark) {
        axios({
          method: "GET",
          url: requrl,
          headers: {
            organizationMark: query.organizationMark
          }
        }).then(response => {
          let mes = response.data.data
          if (mes) {
            this.screenMes = mes
            this.cockpitNavigationList = mes.cockpitNavigationList || []
          } else {
            this.$message.warning('此基地未配置任何信息，请添加模板！')
          }
        })
      } else {
        this.$message.warning('请选择基地！')
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
